package com.neu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.neu.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Schema(description = "造价信息")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("project_cost")
public class Cost extends BaseEntity {
    /**
     *项目ID
     */
    @TableId(type= IdType.ASSIGN_ID)
    private String projectId;

    /**
     * 工作量
     */
    private Float e;

    /**
     * 基准
     */
    private Float f;

    /**
     * 风险
     */
    private Float rsk;

    /**
     * 质量
     */
    private Float q;

    /**
     * 直接非人力成本
     */
    private Float dnc;

    /**
     * 最终造价评估结果
     */
    private Float esdc;

    /**
     * 该部分完没完成
     *
     */
    private Integer progress;

    public Float calcESDC(){
        this.esdc = (e*f+ dnc)*rsk*q;
        return esdc;
    }

}
